package com.guonima.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : guonima
 * @create : 2017-11-09-22:07
 */
@RestController
public class TestController {

    /**
     * 该值来自于github配置文件
     */
    @Value("${test}")
    private String test;

    @Value("${spring-cloud-config-test}")
    private String test2;

    @GetMapping("/test")
    public String test(@RequestParam String name) {
        return "hello " + name + "; we get this value from github test is " + test + "; test2=" + test2;
    }
}
